const express = require('express')
const app = express()

app.use(express.static('./views'))
app.use(express.urlencoded({ extended: false }))
app.get('/xxx', (req, res) => {
  setTimeout(() => {
    res.send('213')
  }, 2000)
})
app.post('/xxx', (req, res) => {
  setTimeout(() => {
    res.send(req.body)
  }, 2000)
})

app.listen(5000, (err) => {
  if (err) console.log('fail')
  else console.log('ok')
})
